import React, { Component } from 'react'

export default class Son extends Component {
    state = {
        num: 888888
    }
    render() {
        console.log(this.props)
        return (
            <div>
                我是子组件 --- { this.state.num }
                {/* <button onClick = {() => {
                    this.props.sendMsg(this.state.num)
                }}>+++</button> */}
            </div>
        )
    }
    componentDidMount() {
        this.props.sendMsg(this.state.num)
    }
}
